import { request } from "@/utils/request.js"

// 登录
export function login(data) {
	return request({
		url: '/auth/wx/login',
		method: "post",
		data
	})
}

// 获取手机号
export function getSjh(params) {
	return request({
		url: `/auth/wx/bindPhone/${params}`
	})
}

// 根据字典类型查询字典数据信息
export function getDicts(params) {
  return request({
    url: `/system/dict/data/type/${params}`
  })
}

// 获取个人信息
export function getInfo(query) {
  return request({
    url: '/system/user/getInfo',
	method: "get",
	  params: query
  })
}

// 获取个人信息
export function getMineStatInfo(query) {
  return request({
    url: '/activity/applet/mineStatInfo',
	method: "get",
	  params: query
  })
}
// 获取我的优惠卷
export function getCouponGet(query) {
  return request({
    url: '/activity/activity/couponGet/list',
	method: "get",
	  params: query
  })
}

// 获取我的打卡列表
export function getClockRecord(query) {
  return request({
    url: '/activity/activity/clockRecord/list',
	method: "get",
	  params: query
  })
}

// 获取我的奖品列表
export function getPrizeList(query) {
  return request({
    url: '/activity/activity/prizeRecord/myPrizeList',
	method: "get",
	  params: query
  })
}

// 获取我的邮币列表
export function getCoinRecord(query) {
  return request({
    url: '/activity/coinRecord/list',
	method: "get",
	  params: query
  })
}

// 获取场景
export function getMapDistance(data) {
  return request({
    url: '/third/gzh/getMapDistance',
	method: "post",
	  data
  })
}

// 我的打开获取本月打卡-连续打卡数据
export function getClickNumStat(query) {
  return request({
    url: '/activity/activity/clockRecord/getClickNumStat',
	method: "get",
	params: query
  })
}

// 我的预约列表
export function myReserveList(query) {
  return request({
    url: '/reservation/placeReserve/myReserveList',
	method: "get",
	params: query
  })
}

//地址管理 -列表
export function sysAddrList(query) {
  return request({
    url: '/system/sysAddr/list',
	method: "get",
	params: query
  })
}

//地址管理 -新增/修改
export function sysAddrsave(data) {
  return request({
    url: '/system/sysAddr/save',
	method: "post",
	params: data
  })
}
//地址管理 -批量删除
export function sysAddrRemove(id) {
  return request({
    url: '/system/sysAddr/remove/'+id,
	method: "delete",
  })
}